package com.hibase.upms.entity.menu.vo;

import com.hibase.core.web.annotation.HibaseValid;
import com.hibase.upms.constant.MdsMenuConstant;
import com.hibase.upms.constant.MenuPageType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * @author ChrisCui
 * @date 2019-4-18
 */
@Data
@ApiModel("新增菜单vo")
@HibaseValid
public class MdsMenuInsertVO {

    @NotBlank(message = "菜单名称不能为空")
    @ApiModelProperty(value = "菜单名称", example = "权限管理")
    private String name;

    @NotBlank(message = "菜单code不能为空")
    @ApiModelProperty(value = "菜单code", example = "xxx")
    private String code;

    @ApiModelProperty(value = "菜单图标/样式", example = "el-icon-menu")
    private String icon;

    @NotBlank(message = "菜单type不能为空")
    @ApiModelProperty(value = "菜单类型", example = "MENU菜单 PAGE页面  OPERATION操作 ELEMENT元素")
    private String type;

    @ApiModelProperty(value = "页面类型(STANDARD/CUSTOMER)", example = "STANDARD")
    private String pageType = MenuPageType.PAGE_TYPE_STANDARD.getName();

    @ApiModelProperty(value = "终端类型分组(BROWSER浏览器 APP移动端 H5等)", example = "H5")
    private String groupType;

    @ApiModelProperty(value = "终端类型（WEB/PDA/PDA_WMS等）",example = "PDA")
    private String clientType;

    @ApiModelProperty(value = "父菜单ID", example = "0")
    private String parentId = MdsMenuConstant.MENU_TREE_ROOT_ID;

    @ApiModelProperty(value = "请求别名", example = "userController/selectUserList")
    private String url;

    @ApiModelProperty(value = "真实请求", example = "/userController/selectUserList")
    private String trueUrl;

    @ApiModelProperty(value = "排序", example = "1 从小到大排序")
    private Long sort;

    @ApiModelProperty(value = "实体对象", example = "com.menu")
    private String clazz;

    @ApiModelProperty(value = "备注", example = "XXX")
    private String remarks;

    @ApiModelProperty(value = "状态（true 启用 false禁用）")
    private Boolean beActive = Boolean.TRUE;

    @ApiModelProperty(value = "是否隐藏（0 正常，1 已隐藏）")
    private Boolean beHide = Boolean.FALSE;

    @ApiModelProperty(value = "是否开启系统保护，默认关闭")
    private Boolean beSystemProtect = Boolean.FALSE;

    @ApiModelProperty(value = "子级数量")
    private Integer childNumber = 0;
}
